package gov.nbcs.govp.zfgl.ui.thread;



import com.foundercy.pf.control.FPageRoller;
import com.foundercy.pf.control.table.FTable;

import com.foundercy.pf.util.FPaginationDTO;

import gov.nbcs.govp.common.bean.PageListBean;

import gov.nbcs.govp.common.ui.DisplayPanel;
import gov.nbcs.govp.common.util.PlatformTools;

import gov.nbcs.govp.zfgl.ibs.IGovpPayBusiness;


import java.awt.Component;
import java.awt.Cursor;
import java.util.List;


public class GovpGetTyearBudgetLoadPage extends Thread {
	
	private DisplayPanel panel;

	private FPaginationDTO page;

	String find_sql="";
	int num = 0;
	private IGovpPayBusiness PayBusiness;

	private FPageRoller pageRoller;

	
	public GovpGetTyearBudgetLoadPage(DisplayPanel panel,IGovpPayBusiness PayBusiness,FPageRoller pageRoller,String find_sql,FPaginationDTO page){
		this.panel = panel;
		this.PayBusiness = PayBusiness;
		this.page = page;
		this.find_sql=find_sql;
		this.pageRoller = pageRoller;
		
	}
	
	public void run()
	{
		panel.setCursor(new Cursor(Cursor.WAIT_CURSOR));
		FTable table = panel.getOperationTable()[0];
		Component c = PlatformTools.replaceTableAsDoing(table);
		PageListBean pagelist = PayBusiness.loadTyearBudgetToByState(panel.getUser(),panel.getCurrentState(),page,find_sql,num);
		List list = pagelist.getDataList();
		PlatformTools.replaceTableAsDone(c,table);
		table.setData(list);
		panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
	}


}
